%clear all; clc;
%close all;

welf0=load('welf_gains_cutsize_bluntcuts.txt');    
welf00=load('welf_gains_cutsize_statecontingentcuts.txt');

b2=load('bgrid2.txt');
a2=load('agrid2.txt');

gain_blunt = [0;100*welf0(:,3)]; 
gain_state = [0;100*welf00(:,3)]; 

percent_grid = 100*[0;welf0(:,2)];

label_model='default';
label_graph='fwd_guide';
format_chart='epsc';

NameArray = {'LineStyle','Color','LineWidth'};
ValueArray1 = {'-';[0.078  0.1686  0.549];2}';
ValueArray2 = {'--','-';[0.078  0.1686  0.549],[0.8  0  0];2,2}'; 

nameFig = char([char(label_model) '_' char(label_graph) '_size']);
figure('name',nameFig);
P=plot(percent_grid,gain_blunt,'-b',percent_grid,gain_state,':r','LineWidth',2.5);  ylabel('%','Fontsize',13);
grid on;
legend('non-state-contingent cuts','state-contingent cuts','Location','SouthEast');
legend boxoff;
xlabel('size of spending cut (%)','FontSize',13);
AX1 = gca;box on;set(AX1,'FontSize',13,'XTick',0:1:6);
set(P,NameArray,ValueArray2);
set(AX1,'YTick',0:0.02:0.1 ,'YLim',[0 0.1],'FontSize',13);
set(AX1,'XTick',0:1:6 ,'XLim',[0 6],'FontSize',13);
%saveas(gcf, fullfile(plot_path, nameFig),format_chart);
exportfig(gcf, fullfile(plot_path, nameFig),'color','cmyk','resolution',1600);